#ifndef QSWIFTPROGRESSDIALOG_H
#define QSWIFTPROGRESSDIALOG_H

#include <QtGui>

namespace Ui {
class QSwiftProgressDialog;
}

class QSwiftProgressDialog : public QDialog
{
	Q_OBJECT
	
public:
	explicit QSwiftProgressDialog(QString title, QString text,
								  int min, int max, QWidget *parent = 0, bool modal = true);
	~QSwiftProgressDialog();

	void setValue(int value);
	bool wasCanceled();
	int minimum();
	int maximum();

	void setText(QString text);
	QString text();
	void setRange(int min, int max);
	QPair<int, int> range();

private slots:
	void on_buttonBox_clicked(QAbstractButton *button);

private:
	Ui::QSwiftProgressDialog *ui;
	bool canceled;
	quint64 startTime;

	void updateProgressBarText();
};

#endif // QSWIFTPROGRESSDIALOG_H
